﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace WindowsFormsApplication1.UCC
{
    class UCCPressDownButton : UCC
    {
        FloorUIForms.FloorUI floor;
        String actionFloor;

        public UCCPressDownButton(FloorUIForms.FloorUI floorui, String floorNum)
        {
            floor = floorui;
            actionFloor = floorNum; 
        }

        public void Run()
        {
//          1. User presses the button
//          2. System lights up button
            floor.lightUpBttn(actionFloor);
//          3. System calls lift to go to that floor
//          4. Lift travels to that floor
//             4a. Lift is already on the floor, skip to step 6
//          5. Lift arrives
//          6. Door opens
            //Thread myThread = new Thread(startLiftMove);
            //myThread.Start(); 
            //floor.moveLift(actionFloor); 
//          7. Lights out
            floor.lightOutBttn(actionFloor); 
        }

        private void startLiftMove()
        {
            //floor.moveLift(actionFloor); 
        }
    }
}
